import React, { Component } from 'react'
import { Switch } from 'antd-mobile'
import { MapConsumer } from 'context/MapContext'

export default class More extends Component {

  // state = {
  //   showMap: true
  // }


  // handleChange() {
  //   this.setState({
  //     showMap: !this.state.showMap
  //   })
  // }

  render() {
    return (
      <MapConsumer>
        {
          ({ showMap, changeMap }) => {
            return (
              <div>
                地图：<Switch checked={showMap}
                  onChange={() => changeMap()}
                ></Switch>
              </div>
            )
          }
        }
      </MapConsumer>
    )
  }
}
